Merged
Conversation
costowell
requested changes
Dec 29, 2025
Contributor
costowell
left a comment
There was a problem hiding this comment.
Overall looks good. Still not totally sold on the MATCH thing, but totally open to feedback.
database/poll.go
Outdated
|
|
||
| const POLL_TYPE_SIMPLE = "simple" | ||
| const POLL_TYPE_RANKED = "ranked" | ||
| const MATCH = "$match" |
Contributor
There was a problem hiding this comment.
I can see where you're (SonarQube is?) going with this, but I'm not so sure this improves maintainability. I think it'd be better to keep this in the query because that's how mongo queries look like i.e.
{ $match: { salary: 9000 } }
I would like more input though, I could be totally crazy.
Contributor
Author
There was a problem hiding this comment.
I can mark it in SonarQube as a false positive because of the query reasoning
shaeespring
added a commit
that referenced
this pull request
Jan 20, 2026
* fixed bug where it would crash if you filled in all canidates + write in (#46) * Check that candidates are not ranked identically (#47) * Check that candidates are not ranked identically * fix bug where write in candidates weren't checked for duplicate rankings * simplified range cause yeah * i think i actually fixed it this time * http response for consistency * removed extra period --------- Co-authored-by: Noah <bigspaceships56@gmail.com> * Always stop once the majority is hit (#50) @tallen42 * Always stop at majority * End is always true if finalResult is calculated * If hidden, say results soon, otherwise URL (#51) @tallen42 * yippee sonarqube support (#54) @Will-Hellinger * Set up golang CI * go mod tidy * gofmt * Allow hiding results while poll is open this replaces the current hide functionality * Clarify dev setup for compose * go mod download as a separate layer for caching * Allow alumni to dev * Make polls modifiable by removing Reveal Polls that are hidden really shouldn't be revealed * Create dev mode evals override * Clarify gatekeep autoclose for evals * Initial setup for golang tests * Rewrite orderOptions to avoid hanging Also write tests * Run go vet * Maintainability (#58) * min number and cognitive complexity * variable name * revert match constant and import math * Logging dependabot readme pr template (#59) * remove debug log call and added dev flags log messages * update readme with some todos * Create pull request template * Add Dependabot configuration for Go modules * oops forgot target-branch --------- Co-authored-by: Noah Hanford <bigspaceships56@gmail.com> Co-authored-by: Tyler Allen <tyler@tallen.me> Co-authored-by: William Hellinger <111201130+Will-Hellinger@users.noreply.github.com> Co-authored-by: Max Meinhold <mxmeinhold@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 3/5 maintainability issues outlined in dev's PR to main #56
Notes
Doesn't touch the TODO comments (the other 2 SonarQube issues).
Labeled $match issue (sonarqube wanted this to be a constant) as a false positive